home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / programming / other / studio16add / scripts / stereoaiff2studio < prev    next >
AmigaDOS Script File  |  1997-12-01  |  2KB  |  88 lines

  1. .key AIFFFILE/A,STUDIOBASE/A
  2. .bra {
  3. .ket }
  4.  
  5. ; This script will convert a stereo AIFF file into two Studio 16 files.
  6. ;
  7. ; $VER: StereoAIFF2Studio 1.0 (12.11.97)
  8. ; Created by Kenneth 'Kenny' Nilsen (kenny@bgnett.no)
  9. ;
  10. ; USAGE: StereoAIFF2Studio <stereoAIFF> <Studio16base>
  11. ;
  12. ; NOTE: The commands must be in the command search path. To be safe
  13. ; copy the commands in C: or add the path where you keep the commands to
  14. ; the global search path (startup-sequence: path <path> ADD).
  15.  
  16. ;** check files:
  17.  
  18. if not exists {AIFFFILE}
  19.     echo "File '{AIFFFILE}' doesn't exist!"
  20.     endif
  21.  
  22. if exists "{STUDIOBASE}_L"
  23.     echo "WARNING: File '{STUDIOBASE}_L' already exist!"
  24.     ask "Continue ? (y/N)"
  25.     if not WARN
  26.        echo "Terminating.."
  27.        skip Final
  28.        endif
  29.     endif
  30.  
  31. if exists "{STUDIOBASE}_R"
  32.     echo "WARNING: File '{STUDIOBASE}_R' already exist!"
  33.     ask "Continue ? (y/N)"
  34.     if not WARN
  35.        echo "Terminating.."
  36.        skip Final
  37.        endif
  38.     endif
  39.  
  40. ;** Ok, start the programs
  41.  
  42. delete {STUDIOBASE}_L >nil:
  43. delete {STUDIOBASE}_R >nil:
  44.  
  45. echo "Converting... please wait"
  46.  
  47. SplitAIFF {AIFFFILE} {STUDIOBASE} >nil:
  48. if WARN
  49.     echo "Error while splitting AIFF file!"
  50.     skip Final
  51.     endif
  52.  
  53. AIFF2Studio {STUDIOBASE}.L {STUDIOBASE}_L >nil:
  54. if WARN
  55.     echo "Error while converting AIFF to Studio 16 file!"
  56.     skip Final
  57.     endif
  58.  
  59. delete {STUDIOBASE}.L >nil:
  60.  
  61. AIFF2Studio {STUDIOBASE}.R {STUDIOBASE}_R >nil:
  62. if WARN
  63.     echo "Error while converting AIFF to Studio 16 file!"
  64.     skip Final
  65.     endif
  66.  
  67. delete {STUDIOBASE}.R >nil:
  68.  
  69. rename {STUDIOBASE}_L_MONO {STUDIOBASE}_L >nil:
  70. rename {STUDIOBASE}_R_MONO {STUDIOBASE}_R >nil:
  71.  
  72. S16SetPan {STUDIOBASE}_L 0 >nil:
  73. if WARN
  74.     echo "Error while setting '{STUDIOBASE}_L' to LEFT"
  75.     endif
  76.  
  77. S16SetPan {STUDIOBASE}_R 200 >nil:
  78. if WARN
  79.     echo "Error while setting '{STUDIOBASE}_R' to RIGHT"
  80.     endif
  81.  
  82. ;** We're done
  83.  
  84. Echo "Done"
  85. Echo ""
  86.  
  87. Lab Final
  88.